package com.yourwork.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

import com.yourwork.service.SalaryService;

/**
 * 定时事务30天执行一次	
 * */
@Configuration
@EnableScheduling
public class SchedulingConfig {
	 	@Autowired
	 	@Qualifier(value="salaryService")
	 	private SalaryService salaryService;
	 	@Scheduled(cron="0 0 0 1 * ?")
	    public void getToken() {
	    	salaryService.insertSalary();
	    }
}
